let bedroomLight;
let bathroomLight;
let EntLight;
let KitchenLight;
let diningRoomLight;
let livingRoomLight;
let balconyLight;



let lightArray = new Array();


const defaultParams = {
    color: 0xffffcc,
    intensity: 3,
    distance: 7,
    decay: 4,
    x: 0,
    y: 0,
    z: 0,
}
// 创建灯光
function createLight(params,light,entity_id) {
    params = {
        ...defaultParams,
        ...params,
    }
    light = new THREE.PointLight(params.color, params.intensity, params.distance, params.decay);
    light.position.set(params.x, params.y, params.z);
    scene.add(light);
    lightArray.push({
        entity_id: entity_id,
        light: light,
        params: params,
        
    })
}

